import { AxiosResponse } from 'axios';
import { Post } from '../axios';



/* 应用下载记录 */
interface DowrecordInterface {
    (data: {
        lid: string
        pageNo: number
        pageSize: number
    }): Promise<AxiosResponse<any>>
}
export const dowrecord: DowrecordInterface = async (data) => {
    try {
        return await Post({ url: "/merge/dowrecord", data });
    } catch (error) {
        throw error
    }
}



/* 应用合并 */
interface MergeInterface {
    (data: {
        id: string
        lid: string | null
        mergeType: string | null
        apptype: string
    }): Promise<AxiosResponse<any>>
}
export const AddMerge: MergeInterface = async (data) => {
    try {
        return await Post({ url: "/merge/addmerge", data });
    } catch (error) {
        throw error
    }
}



/* 查询应用合并 */
interface GetMergeInterface {
    (data: {
        lid: string
        apptype: string
    }): Promise<AxiosResponse<any>>
}
export const GetMerge: GetMergeInterface = async (data) => {
    try {
        return await Post({ url: "/merge/getmerge", data });
    } catch (error) {
        throw error
    }
}